//
//  HisInfoVC.m
//  TuYouAPP
//
//  Created by L on 14-2-28.
//
//

#import "HisInfoVC.h"
#import "MyPublishVC.h"
#import "UIImageView+WebCache.h"
@interface HisInfoVC ()

@end

@implementation HisInfoVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    self.mPageName = @"TA的";
    [super viewDidLoad];
    self.Title = @"TA的资料";
        self.LeftBarTitle = @"返回";
    // Do any additional setup after loading the view from its nib.
    self.topView.layer.borderWidth = 0.5;
    self.topView.layer.borderColor = [ColorRGB(212, 212, 212)CGColor];
    self.botView.layer.borderWidth = 0.5;
    self.botView.layer.borderColor = [ColorRGB(212, 212, 212)CGColor];
    [self.userHeadImage setImageWithURL:[NSURL URLWithString:self.tagUser.mHeadImgURL] placeholderImage:[UIImage imageNamed:@"70_70.png"]];
    self.userName.text = self.tagUser.mUserDisplayName;
    
    self.duijiang.text = self.tagUser.mDuijiang?self.tagUser.mDuijiang:@"未登记频率";
    self.userage.text = [self.tagUser.mAge intValue]>0?self.tagUser.mAge:@"";
    self.sexImag.image =self.tagUser. mSex==1?[UIImage imageNamed:@"women.png"]:[UIImage imageNamed:@"men.png"];
    self.userPointAddr.text = self.tagUser.mUserPointAddr;
    self.addrpoint.text = self.tagUser.mnowUserpointAddr.length==0? @"不知道他在哪儿":self.tagUser.mnowUserpointAddr;
    CGSize constraint = CGSizeMake(290, CGFLOAT_MAX);
    CGSize size ;
    CGRect rect;
    if (self.tagUser.mUserSign.length == 0) {
        self.tagUser.mUserSign = @"这个人很懒，还没有签名。";
    }

    size = [self.tagUser.mUserSign sizeWithFont:[UIFont systemFontOfSize:17] constrainedToSize:constraint lineBreakMode:NSLineBreakByWordWrapping];
    
    rect = self.userSign.frame;
    rect.origin.y = 5;
    rect.size.height = size.height+5;
    self.userSign.frame = rect;
    rect = self.topView.frame;
    rect.size.height =self.userSign.frame.size.height+10;
    self.topView.frame = rect;
    rect = self.botView.frame;
    rect.origin.y = self.topView.frame.size.height+self.topView.frame.origin.y+15;
    self.botView.frame = rect;
    self.userSign.text = self.tagUser.mUserSign;

}

-(void)leftBtnTouched:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
